home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Plus / Multimedia Plus with ClearVue Version 10-94 (Knowledge Media Inc.).ISO / dos / anim / flilib / flisrc / jopen.c < prev    next >
C/C++ Source or Header  |  1989-11-16  |  386b  |  22 lines

  1.  
  2. #include "jlib.h"
  3.  
  4.  
  5. /* Open a file that already exists */
  6. Jfile dos_open (title, mode)
  7. char *title;
  8. int mode;
  9. {
  10. union i86_regs reg;
  11.  
  12. reg.b.ah = 0x3d;    /* open file */
  13. reg.b.al = mode;        /* read/write etc... */
  14. reg.w.dx = i86_ptr_offset(title);
  15. reg.w.ds = i86_ptr_seg(title);
  16. if (i86_sysint(0x21,®,®)&1)    /* check carry */
  17.     return(0);
  18. else
  19.     return(reg.w.ax);
  20. }
  21.  
  22.